//
//  JinButton.swift
//  lottery
//
//  Created by admin on 16/2/5.
//  Copyright © 2016年 jin. All rights reserved.
//

import UIKit

class JinButton: UIButton {

    /*
    // Only override drawRect: if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func drawRect(rect: CGRect) {
        // Drawing code
    }
    */
    override func imageRectForContentRect(contentRect: CGRect) -> CGRect {
        let w:CGFloat = 40
        let h:CGFloat = 40
        let x:CGFloat = (contentRect.size.width - w) * 0.5
        let y:CGFloat = 20
        return CGRectMake(x, y, w, h)
    }
}
